package gui.commons;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

public class CellRenderer extends DefaultTableCellRenderer {

	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
			Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
			int x = (int)dim.getWidth();
			//Component cell = 
			super.getTableCellRendererComponent(table, value,isSelected, hasFocus, row, column);
			this.setBackground(Color.black);
			if(table.getColumnCount()>1 && column==1){
				this.setFont(new Font("Arial", Font.BOLD,(int)(x/100)));
				this.setForeground(Color.white);
				this.setHorizontalAlignment(JLabel.CENTER);
			}else{
				this.setFont(new Font("Arial", Font.BOLD,(int)(x/71)));
				this.setForeground(Color.white);
				this.setHorizontalAlignment(JLabel.CENTER);
			}
			return this;
	} 


}